package com.atguigu.yygh.msm.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.msm.service.MsmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 孔德成
 * @slogan 致敬大师，致敬未来的你
 * @date 2021/9/8 9:23 上午
 * @desc
 */
@Api(tags = "短信服务")
@RestController
@RequestMapping("/api/msm")
public class MsmController {

    private final MsmService msmService;

    public MsmController(MsmService msmService) {
        this.msmService = msmService;
    }

    @ApiOperation("发送验证码")
    @GetMapping(value = "/send/{phone}")
    public R code(@PathVariable String phone) {
        // 测试 phone = 13304469618 code = 1234
//        msmService.send(phone);
        return R.ok();
    }
}
